import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/admin/system/sysSystemSitepage/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/admin/system/sysSystemSitepage/',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/admin/system/sysSystemSitepage/' + id,
    method: 'get'
  })
}

export function delObj(row) {
  return request({
    url: '/admin/system/sysSystemSitepage/' + row.id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/admin/system/sysSystemSitepage/',
    method: 'put',
    data: obj
  })
}

export function initPerm(options,permissions) {
  options.addBtn = permissions['sys_system_sitepage_add'] ||false;
  options.editBtn = permissions['sys_system_sitepage_upd'] ||false;
  options.delBtn = permissions['sys_system_sitepage_del'] ||false;
}

